import { dialog_operate } from '../../../../../../global_comps/Classes/dialog_operate/Classes/cla_dialog_operate';
import { normalizeContainer } from '../../../../../../global_comps/Func/normalizeContainer';
import { pack_all_child_node_from_to } from '../../../../../../global_comps/Func/pack_all_child_node_from_to';
import {
  load_file_info_border,
  load_file_info_container,
  spacename_load_file_info,
} from '../DataDefine/sourceData';
import type { load_file_info_props } from './cla_load_file_info_props';

const load_file_info_staticNodeTag = 'load_file_info_staticNode';

export class load_file_info_staticNode extends dialog_operate {
  get [Symbol.toStringTag]() {
    return load_file_info_staticNodeTag;
  }

  constructor(props?: load_file_info_props) {
    super(spacename_load_file_info);

    // 在 点击 空白元素后 将 文件信息 归位
    this.whiteSpace_click_func_promise_after = () =>
      new Promise<void>((resolve) => {
        pack_all_child_node_from_to(this.dom_dialog, this.dom_container);
        resolve();
      });
  }

  /**
   * 文件 信息元素 主体
   */
  dom_boder = normalizeContainer(load_file_info_border)!;

  /**
   * 文件 信息 容器
   */
  dom_container = normalizeContainer(load_file_info_container)!;
}
